GNU getopt(1) is a program to help shell scripts parse command-line parameters.
